﻿using UnityEngine;
using System.Collections;

[RequireComponent(typeof(Renderer))]
public class BlinkAnim : MonoBehaviour {

	public float blinkTime = 0.6f;

	void Update()
	{
		bool showTapToStart = Mathf.Repeat (Time.realtimeSinceStartup, 3 * blinkTime) > blinkTime;
		Color col = GetComponent<Renderer> ().material.color;
		col.a = showTapToStart ? 1.0f : 0.0f;
		GetComponent<Renderer> ().material.color = col;
	}
}
